package com.google.gson.internal.bind;

import com.google.gson.a.a;
import com.google.gson.internal.b;
import com.google.gson.internal.bind.TypeAdapter.Factory;
import com.google.gson.internal.f;
import java.lang.reflect.Type;
import java.util.Collection;

public final class d implements Factory {
    private final f a;

    public d(f fVar) {
        this.a = fVar;
    }

    public TypeAdapter create(l lVar, a aVar) {
        Type b = aVar.b();
        Class a = aVar.a();
        if (!Collection.class.isAssignableFrom(a)) {
            return null;
        }
        Type a2 = b.a(b, a);
        return new e(this, lVar, a2, lVar.a(a.a(a2)), this.a.a(aVar));
    }
}
